package com.pingan.cashier.service.mapstruct;

import com.pingan.cashier.dal.entity.PayChannel;
import com.pingan.cashier.dal.entity.PayMethod;
import com.pingan.cashier.service.dto.PayChannelDTO;
import com.pingan.cashier.service.dto.PayMethodDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * DTO转换
 */
@Mapper
public interface PayChannelTransfer {

    PayChannelTransfer INSTANCE = Mappers.getMapper(PayChannelTransfer.class);

    /**
     * PayChannel to PayChannelDTO
     * @param payChannel payChannel
     * @return
     */
    PayChannelDTO toPayChannelDTO(PayChannel payChannel);

    /**
     * toPayChannelDTO
     * @param payChannelList  payChannelList
     * @return
     */
    List<PayChannelDTO> toPayChannelDTO(List<PayChannel> payChannelList);

    /**
     * toPayMethodDTO
     * @param payMethod
     * @return
     */
    PayMethodDTO toPayMethodDTO(PayMethod payMethod);

    /**
     * toPayMethodDTOList
     * @param payMethodList
     * @return
     */
    List<PayMethodDTO> toPayMethodDTOList(List<PayMethod> payMethodList);
}
